<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 群用户 基类
 * @Entity
 * @Table(name="fa_group_users", id={"id"})
 * @DDL("CREATE TABLE `fa_group_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `group_id` int(10) unsigned DEFAULT NULL COMMENT '群ID',
  `uid` int(10) unsigned DEFAULT NULL COMMENT '用户',
  `time` int(10) unsigned DEFAULT NULL COMMENT '加入时间',
  `join_status` enum('1','2') DEFAULT '1' COMMENT '加入状态:1=搜索加群,2=扫码加群',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='群用户'")
 * @property int $id 
 * @property int $groupId 群ID
 * @property int $uid 用户
 * @property int $time 加入时间
 * @property string $joinStatus 加入状态:1=搜索加群,2=扫码加群
 */
abstract class GroupUsersBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 群ID
     * group_id
     * @Column(name="group_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $groupId;

    /**
     * 获取 groupId - 群ID
     *
     * @return int
     */ 
    public function getGroupId()
    {
        return $this->groupId;
    }

    /**
     * 赋值 groupId - 群ID
     * @param int $groupId group_id
     * @return static
     */ 
    public function setGroupId($groupId)
    {
        $this->groupId = $groupId;
        return $this;
    }

    /**
     * 用户
     * uid
     * @Column(name="uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $uid;

    /**
     * 获取 uid - 用户
     *
     * @return int
     */ 
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * 赋值 uid - 用户
     * @param int $uid uid
     * @return static
     */ 
    public function setUid($uid)
    {
        $this->uid = $uid;
        return $this;
    }

    /**
     * 加入时间
     * time
     * @Column(name="time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $time;

    /**
     * 获取 time - 加入时间
     *
     * @return int
     */ 
    public function getTime()
    {
        return $this->time;
    }

    /**
     * 赋值 time - 加入时间
     * @param int $time time
     * @return static
     */ 
    public function setTime($time)
    {
        $this->time = $time;
        return $this;
    }

    /**
     * 加入状态:1=搜索加群,2=扫码加群
     * join_status
     * @Column(name="join_status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $joinStatus;

    /**
     * 获取 joinStatus - 加入状态:1=搜索加群,2=扫码加群
     *
     * @return string
     */ 
    public function getJoinStatus()
    {
        return $this->joinStatus;
    }

    /**
     * 赋值 joinStatus - 加入状态:1=搜索加群,2=扫码加群
     * @param string $joinStatus join_status
     * @return static
     */ 
    public function setJoinStatus($joinStatus)
    {
        $this->joinStatus = $joinStatus;
        return $this;
    }

}
